// 用户路由模块
const express = require('express')
const router = express.Router()

const user_handler = require('../router_handler/user')

// 验证数据中间件
const expressJoi = require('@escook/express-joi')
// 需要验证的数据对象
const {reg_login_schema} = require('../schema/user')

// 注册
router.post('/register', expressJoi(reg_login_schema), user_handler.register)
// 登录
router.post('/login', user_handler.login)

module.exports = router